//
//  HAction.h
//  TestOCRedux
//
//  Created by Hotacool on 2019/1/17.
//  Copyright © 2019 Hotacool. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol HActionType <NSObject>
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) id payload;
@end

@interface HAction : NSObject <HActionType>
@property (nonatomic, strong) NSString *type;
@property (nonatomic, strong) id payload;

+ (HAction*)actionWithType:(NSString*)type;
+ (HAction*)actionWithType:(NSString*)type payload:(id)payload;
@end

#define ActionBox(x) ([HAction actionWithType:x])
